package com.franz.noteapp.bean

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.franz.noteapp.ui.theme.*

/**
 * 笔记数据库存储实体类*/
@Entity(tableName = "NoteTable")
data class NoteBean(
    @PrimaryKey val id:Int?,
    val color:Int,
    val title:String,
    val content:String,
    val time:Long
){
    companion object{
        val noteColor = listOf(RedOrange, LightGreen, Violet, BabyBlue, RedPink)
    }
}

/**
 * 自定义一个异常类，当标题或者内容为空的时候进行触发*/
class InvalidNoteException(message: String): Exception(message)
